+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
+Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
+
+ * gdk/gdkimage.c: changed g_new()s to malloc()s and
+ g_free()s to free()s to avoid mixing g_new()s with
+ free()s. X itself uses free() on some of the
+ malloced memory.
+
Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com>
* gtkfilesel.c: Maintain a list of directories like
Visual *xvisual;
GdkImage *image;
GdkImagePrivate *private;
- private = g_new(GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage *) private;
private->xdisplay = gdk_display;
private->image_put = gdk_image_put_normal;
break;
default:
- private = g_new (GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage*) private;
private->xdisplay = gdk_display;
{
private->image_put = gdk_image_put_shared;
- private->x_shm_info = g_new (XShmSegmentInfo, 1);
+ private->x_shm_info = malloc (sizeof (XShmSegmentInfo));
x_shm_info = private->x_shm_info;
private->ximage = XShmCreateImage (private->xdisplay, xvisual, visual->depth,
{
g_warning ("XShmCreateImage failed");
- g_free (image);
+ free (image);
gdk_use_xshm = False;
return NULL;
}
g_warning ("shmget failed!");
XDestroyImage (private->ximage);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
gdk_use_xshm = False;
return NULL;
XDestroyImage (private->ximage);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
return NULL;
}
shmdt (x_shm_info->shmaddr);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
gdk_use_xshm = False;
return NULL;
}
else
{
- g_free (image);
+ free (image);
return NULL;
}
break;
#else /* USE_SHM */
- g_free (image);
+ free (image);
return NULL;
#endif /* USE_SHM */
case GDK_IMAGE_NORMAL:
private->ximage = XCreateImage (private->xdisplay, xvisual, visual->depth,
ZPixmap, 0, 0, width, height, 32, 0);
- private->ximage->data = g_new (char, private->ximage->bytes_per_line *
- private->ximage->height);
+ private->ximage->data = malloc (sizeof (char) * private->ximage->bytes_per_line * private->ximage->height);
break;
case GDK_IMAGE_FASTEST:
if (win_private->destroyed)
return NULL;
- private = g_new (GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage*) private;
private->xdisplay = gdk_display;
shmdt (x_shm_info->shmaddr);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
+ free (private->x_shm_info);
image_list = g_list_remove (image_list, image);
#else /* USE_SHM */
g_assert_not_reached ();
}
- g_free (image);
+ free (image);
}
static void
Visual *xvisual;
GdkImage *image;
GdkImagePrivate *private;
- private = g_new(GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage *) private;
private->xdisplay = gdk_display;
private->image_put = gdk_image_put_normal;
break;
default:
- private = g_new (GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage*) private;
private->xdisplay = gdk_display;
{
private->image_put = gdk_image_put_shared;
- private->x_shm_info = g_new (XShmSegmentInfo, 1);
+ private->x_shm_info = malloc (sizeof (XShmSegmentInfo));
x_shm_info = private->x_shm_info;
private->ximage = XShmCreateImage (private->xdisplay, xvisual, visual->depth,
{
g_warning ("XShmCreateImage failed");
- g_free (image);
+ free (image);
gdk_use_xshm = False;
return NULL;
}
g_warning ("shmget failed!");
XDestroyImage (private->ximage);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
gdk_use_xshm = False;
return NULL;
XDestroyImage (private->ximage);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
return NULL;
}
shmdt (x_shm_info->shmaddr);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
- g_free (image);
+ free (private->x_shm_info);
+ free (image);
gdk_use_xshm = False;
return NULL;
}
else
{
- g_free (image);
+ free (image);
return NULL;
}
break;
#else /* USE_SHM */
- g_free (image);
+ free (image);
return NULL;
#endif /* USE_SHM */
case GDK_IMAGE_NORMAL:
private->ximage = XCreateImage (private->xdisplay, xvisual, visual->depth,
ZPixmap, 0, 0, width, height, 32, 0);
- private->ximage->data = g_new (char, private->ximage->bytes_per_line *
- private->ximage->height);
+ private->ximage->data = malloc (sizeof (char) * private->ximage->bytes_per_line * private->ximage->height);
break;
case GDK_IMAGE_FASTEST:
if (win_private->destroyed)
return NULL;
- private = g_new (GdkImagePrivate, 1);
+ private = malloc (sizeof (GdkImagePrivate));
image = (GdkImage*) private;
private->xdisplay = gdk_display;
shmdt (x_shm_info->shmaddr);
shmctl (x_shm_info->shmid, IPC_RMID, 0);
- g_free (private->x_shm_info);
+ free (private->x_shm_info);
image_list = g_list_remove (image_list, image);
#else /* USE_SHM */
g_assert_not_reached ();
}
- g_free (image);
+ free (image);
}
static void